<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <%= stylesheet_link_tag "application" %>
  </head>
  <body>
    <div class="body">
      <div class="masthead">
      <h1>
        NewsInnovation HashMash
      </h1>
      <% form_tag feeds_url, :method => :get do %>
        <%= text_field_tag :id, @search.gsub(/%20/, " ") %>
        <%= submit_tag "Search For Tag", :action => :show %>
      <% end %>
      </div>
      <ol class="timeline">
      <% @feeds.each do |entry| %>
        <% if entry.item.respond_to?(:from_user) # Twitter update %>
        <% update = entry.item %>
          <li id="status_<%= update.id %>" class="hentry status u-<%= update.from_user %>">
          <span class="thumb vcard author"><a class="url" href="http://twitter.com/<%= update.from_user %>"><img width="48" height="48" src="<%= update.profile_image_url %>" class="photo fn" alt="" /></a></span><span class="status-body"><strong><a title="" href="http://twitter.com/<%= update.from_user %>"><%= update.from_user %></a></strong> <span class="entry-content"><%= update.text %></span> <span class="meta entry-meta"><span title="<%= update.created_at %>" class="published"><%= update.created_at %></span></span>
          </li>
        <% else # News item %>
          <% item = entry.item %>
          <li class="news hentry">
            <span class="thumb vcard author"><a class="url" href="<%= item.link %>"><img width="48" height="48" src="" class="photo fn" alt="" /></a></span><span class="status-body"><span class="entry-content"><%= ( CGI.unescapeHTML(item.content) || "").gsub(/<\/?(div|table|tbody|tr|td|font)[^>]*>/, "")  %></span><br/><span class="meta entry-meta"><span title="<%= item.modified %>" class="published"><%= item.modified %></span></span>
          </li>
        <% end %>
      <% end %>
      </ol>
    </div>
  </body>
</html>
